import turtle

turtle.hideturtle()

def drawChessboard(startx,starty):
    for i in range(0,8):
        for j in range(0,8):
                turtle.penup()
                if (i % 2 == 0 and j % 2 == 0) or (i % 2 != 0 and j % 2 != 0):
                    turtle.begin_fill()
                    turtle.color("black")
                turtle.goto(startx+20*j+20,starty+i*20)
                turtle.pendown()
                turtle.forward(20)
                turtle.left(90)
                turtle.forward(20)
                turtle.left(90)
                turtle.forward(20)
                turtle.left(90)
                turtle.forward(20)
                turtle.left(90)
                if (i % 2 == 0 and j % 2 == 0) or (i % 2 != 0 and j % 2 != 0):
                    turtle.end_fill()


drawChessboard(-170,0)
drawChessboard(0,0)


turtle.done()
